package com.taotao.sso.service;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.taotao.common.pojo.TaotaoResult;
import com.taotao.pojo.TbUser;

/***
 * 用户 service
 * @author Administrator
 *
 */
public interface UserService {
	
	/***
	 * 数据校验,检查是否有重复的
	 * @param content 参数值
	 * @param type 参数
	 * @return
	 */
	public TaotaoResult checkData(String content, Integer type);
	
	/***
	 * 注册用户
	 * @param user
	 * @return
	 */
	public TaotaoResult createUser(TbUser user);
	
	/**
	 * 用户登录
	 * <p>Title: userLogin</p>
	 * <p>Description: </p>
	 * @param username
	 * @param password
	 * @return
	 * @see com.taotao.sso.service.UserService#userLogin(java.lang.String, java.lang.String)
	 */
	public TaotaoResult userLogin(String username, String password,HttpServletRequest request,HttpServletResponse response);
	
	/**
	 * 根据token获取用户信息
	 * @param token
	 * @return
	 */
	public TaotaoResult getUserByToken(String token);
	
}
